﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VAdvantage.Classes;
using VAdvantage.Utility;

namespace VAdvantage.Print
{
    public class ParameterElement : GridElement
    {
        public ParameterElement(Query query, Ctx ctx, MPrintTableFormat tFormat)
            : base(query.GetRestrictionCount(), 4)
        {
            
            SetData(0, 0, Msg.GetMsg(ctx, "Parameter") + ":", tFormat.GetPageHeader_Font(), tFormat.GetPageHeaderFG_Color());
            for (int r = 0; r < query.GetRestrictionCount(); r++)
            {
                SetData(r, 1, query.GetInfoName(r), tFormat.GetParameter_Font(), tFormat.GetParameter_Color());
                SetData(r, 2, query.GetInfoOperator(r), tFormat.GetParameter_Font(), tFormat.GetParameter_Color());
                SetData(r, 3, query.GetInfoDisplayAll(r), tFormat.GetParameter_Font(), tFormat.GetParameter_Color());
            }
        }	//	ParameterElement
    }
}
